// 健康管理师接口
interface IHealthManager {
  healthMgrId: number;
  healthMgrName: string;
  status?: number;
  remark?: string;
  createtime?: string;
  updatetime?: string;
}

// 基本信息接口
interface IMembers {
  id: number;
  fileNumber: string;
  name: string;
  sex: string;
  age?: number;
  idCard: string;
  phoneNumber: string;
  regTime?: string;
  password?: string;
  email?: string;
  birthday?: string;
  remark?: string;
  createtime?: string;
  updatetime?: string;
  infoId?: number;
  
  // 关联数据
  TMemberInfo?: ITMemberInfo;
  TMemberDynamicinfo?: ITMemberDynamicinfo;
  TMemberMedicalhistory?: ITMemberMedicalhistory;
  
  // 列表数据（用于详情页）
  TMemberDynamicinfos?: ITMemberDynamicinfo[];
  TMemberMedicalhistories?: ITMemberMedicalhistory[];
  
  // 统计信息
  dynamicInfoCount?: number;
  medicalHistoryCount?: number;
  
  // 健康管理师信息
  healthMgrName?: string;
}

// 详细信息接口
interface ITMemberInfo {
  id?: number;
  maritalStatus?: number; // 1=未婚, 2=已婚, 3=离异, 4=丧偶
  job?: string;
  educationDegree?: string;
  nativePlace?: string;
  healthMgrId?: number;
  healthMgrName?: string;
  status?: number; // 0-正常, 1-冻结, 2-注销
  createtime?: string;
  updatetime?: string;
}

// 动态信息接口
interface ITMemberDynamicinfo {
  id?: number;
  tMemberId?: number;
  height?: number;
  weight?: number;
  dbp?: number;
  sbp?: number;
  breth?: string;
  thermometer?: number;
  waistline?: number;
  hipline?: number;
  createtime?: string;
  updatetime?: string;
}

// 病史信息接口
interface ITMemberMedicalhistory {
  id?: number;
  tMemberId?: number;
  previousHistory?: string;
  familyHistory?: string;
  allergicHistory?: string;
  medicalHistory?: string;
  chronicDisease?: string;
  createtime?: string;
  updatetime?: string;
}

// 完整会员信息接口 - 扩展 IMembers 确保一致性
interface IMemberFull extends IMembers {
  // 这里不需要重复定义，直接从 IMembers 继承
}

// 分页结果接口
interface IPageResult<T> {
  state: number;
  code: string;
  msg: string;
  page: number;
  size: number;
  count: number;
  data: T[];
}

// 单个结果接口
interface IResultData<T> {
  state: number;
  code: string;
  msg: string;
  data?: T;
}

// 通用结果接口（无数据）
interface IResultHandle {
  state: number;
  code: string;
  msg: string;
}

// 健康管理师列表响应
interface IHealthManagerListResult {
  state: number;
  code: string;
  msg: string;
  data: IHealthManager[];
}

export type {
  IMembers,
  ITMemberInfo,
  ITMemberDynamicinfo,
  ITMemberMedicalhistory,
  IPageResult,
  IResultHandle,
  IHealthManager,
  IMemberFull,
  IResultData,
  IHealthManagerListResult
}